<?php  
class Controllercommonmy extends Controller {
	public function index() {
    
        if (!$this->customer->isLogged()) {
	  		$this->session->data['redirect'] = $this->url->link('common/my', '', 'SSL');

	  		$this->redirect($this->url->link('account/login', '', 'SSL')); 
    	}
    
		$this->document->setTitle($this->config->get('config_title'));
		$this->document->setDescription($this->config->get('config_meta_description'));
        $this->document->setCurrentLocation('我的鼎宴');
		$this->data['heading_title'] = $this->config->get('config_title');

		if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/common/my.tpl')) {
			$this->template = $this->config->get('config_template') . '/template/common/my.tpl';
		} else {
			$this->template = 'default/template/common/my.tpl';
		}

        $this->data['firstname'] = $this->customer->getFirstName();
        $this->data['email'] = $this->customer->getEmail();
        $this->data['tel'] = $this->customer->getTelephone();
        
		$this->children = array(
            'module/myside',
			'common/footer',
			'common/header'
		);
        
		$this->response->setOutput($this->render());										
        
        
	}
}
?>